package com.cuijq.ms.visitordesign.v4;

/**
 * @author by CuiJQ
 * @Classname SingleDispatchClass
 * @Description SingleDispatchClass Description
 * @Date 2021/5/30 23:04
 */
public class SingleDispatchClass {

  public void polymorphismFunction(ParentClass p) {
    p.f();
  }

  public void overloadFunction(ParentClass p) {
    System.out.println("I am overloadFunction(ParentClass p).");
  }

  public void overloadFunction(ChildClass c) {
    System.out.println("I am overloadFunction(ChildClass c).");
  }
}
